$('.editable .category#<%= dom_id(@category) %>').replaceWith(
  '<%= escape_javascript(render "edit", category: @category ) %>'
);